import request from '@/utils/request'

const api_name = '/admin/vod/teacher'

export default {
	//讲师列表
    pageList(page, limit, searchObj) {
        return request({
            url: `${api_name}/findQueryPage/${page}/${limit}`,
            method: `post`,
            data: searchObj
        })
    },
	//删除讲师
    removeTeacherById(id) {
        return request({
            url: `${api_name}/remove/${id}`,
            method: `delete`,
        
        })
    },
	//添加讲师
    saveTeacher(teacher) {
        return request({
            url: `${api_name}/save`,
            method: `post`,
            data: teacher
        })
    },
    //根据id获取讲师
    getById(id){
        return request({
            url: `${api_name}/get/${id}`,
            method: `get`,
            })
    },
    //修改讲师
    updateById(teacher){
        return request({
            url: `${api_name}/teacher/update`,
            method: `put`,
            data: teacher
            })
    },
    //批量删除讲师
    batchRemove(idList){
        return request({
            url: `${api_name}/batchRemove`,
            method: `delete`,
            data: idList
            })
    },
     //所有讲师
     list() {
        return request({
          url: `${api_name}/findAll`,
          method: `get`
        })
    }

}